package qldc.pm.tiensu.service.persistence;

import com.liferay.portal.kernel.bean.PortletBeanLocatorUtil;
import com.liferay.portal.kernel.dao.orm.DynamicQuery;
import com.liferay.portal.kernel.exception.SystemException;
import com.liferay.portal.kernel.util.OrderByComparator;
import com.liferay.portal.kernel.util.ReferenceRegistry;
import com.liferay.portal.service.ServiceContext;

import qldc.pm.tiensu.model.CongViecBanGiao;

import java.util.List;

/**
 * The persistence utility for the cong viec ban giao service. This utility wraps {@link CongViecBanGiaoPersistenceImpl} and provides direct access to the database for CRUD operations. This utility should only be used by the service layer, as it must operate within a transaction. Never access this utility in a JSP, controller, model, or other front-end class.
 *
 * <p>
 * Caching information and settings can be found in <code>portal.properties</code>
 * </p>
 *
 * @author Brian Wing Shun Chan
 * @see CongViecBanGiaoPersistence
 * @see CongViecBanGiaoPersistenceImpl
 * @generated
 */
public class CongViecBanGiaoUtil {
    private static CongViecBanGiaoPersistence _persistence;

    /*
     * NOTE FOR DEVELOPERS:
     *
     * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class.
     */

    /**
     * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
     */
    public static void clearCache() {
        getPersistence().clearCache();
    }

    /**
     * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel)
     */
    public static void clearCache(CongViecBanGiao congViecBanGiao) {
        getPersistence().clearCache(congViecBanGiao);
    }

    /**
     * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
     */
    public static long countWithDynamicQuery(DynamicQuery dynamicQuery)
        throws SystemException {
        return getPersistence().countWithDynamicQuery(dynamicQuery);
    }

    /**
     * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
     */
    public static List<CongViecBanGiao> findWithDynamicQuery(
        DynamicQuery dynamicQuery) throws SystemException {
        return getPersistence().findWithDynamicQuery(dynamicQuery);
    }

    /**
     * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
     */
    public static List<CongViecBanGiao> findWithDynamicQuery(
        DynamicQuery dynamicQuery, int start, int end)
        throws SystemException {
        return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
    }

    /**
     * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
     */
    public static List<CongViecBanGiao> findWithDynamicQuery(
        DynamicQuery dynamicQuery, int start, int end,
        OrderByComparator orderByComparator) throws SystemException {
        return getPersistence()
                   .findWithDynamicQuery(dynamicQuery, start, end,
            orderByComparator);
    }

    /**
     * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel)
     */
    public static CongViecBanGiao update(CongViecBanGiao congViecBanGiao)
        throws SystemException {
        return getPersistence().update(congViecBanGiao);
    }

    /**
     * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, ServiceContext)
     */
    public static CongViecBanGiao update(CongViecBanGiao congViecBanGiao,
        ServiceContext serviceContext) throws SystemException {
        return getPersistence().update(congViecBanGiao, serviceContext);
    }

    /**
    * Returns all the cong viec ban giaos where bienBanBanGiaoHoSoId = &#63;.
    *
    * @param bienBanBanGiaoHoSoId the bien ban ban giao ho so ID
    * @return the matching cong viec ban giaos
    * @throws SystemException if a system exception occurred
    */
    public static java.util.List<qldc.pm.tiensu.model.CongViecBanGiao> findByBienBanBanGiaoHoSoId(
        long bienBanBanGiaoHoSoId)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence().findByBienBanBanGiaoHoSoId(bienBanBanGiaoHoSoId);
    }

    /**
    * Returns a range of all the cong viec ban giaos where bienBanBanGiaoHoSoId = &#63;.
    *
    * <p>
    * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link qldc.pm.tiensu.model.impl.CongViecBanGiaoModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
    * </p>
    *
    * @param bienBanBanGiaoHoSoId the bien ban ban giao ho so ID
    * @param start the lower bound of the range of cong viec ban giaos
    * @param end the upper bound of the range of cong viec ban giaos (not inclusive)
    * @return the range of matching cong viec ban giaos
    * @throws SystemException if a system exception occurred
    */
    public static java.util.List<qldc.pm.tiensu.model.CongViecBanGiao> findByBienBanBanGiaoHoSoId(
        long bienBanBanGiaoHoSoId, int start, int end)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence()
                   .findByBienBanBanGiaoHoSoId(bienBanBanGiaoHoSoId, start, end);
    }

    /**
    * Returns an ordered range of all the cong viec ban giaos where bienBanBanGiaoHoSoId = &#63;.
    *
    * <p>
    * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link qldc.pm.tiensu.model.impl.CongViecBanGiaoModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
    * </p>
    *
    * @param bienBanBanGiaoHoSoId the bien ban ban giao ho so ID
    * @param start the lower bound of the range of cong viec ban giaos
    * @param end the upper bound of the range of cong viec ban giaos (not inclusive)
    * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
    * @return the ordered range of matching cong viec ban giaos
    * @throws SystemException if a system exception occurred
    */
    public static java.util.List<qldc.pm.tiensu.model.CongViecBanGiao> findByBienBanBanGiaoHoSoId(
        long bienBanBanGiaoHoSoId, int start, int end,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence()
                   .findByBienBanBanGiaoHoSoId(bienBanBanGiaoHoSoId, start,
            end, orderByComparator);
    }

    /**
    * Returns the first cong viec ban giao in the ordered set where bienBanBanGiaoHoSoId = &#63;.
    *
    * @param bienBanBanGiaoHoSoId the bien ban ban giao ho so ID
    * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
    * @return the first matching cong viec ban giao
    * @throws qldc.pm.tiensu.NoSuchCongViecBanGiaoException if a matching cong viec ban giao could not be found
    * @throws SystemException if a system exception occurred
    */
    public static qldc.pm.tiensu.model.CongViecBanGiao findByBienBanBanGiaoHoSoId_First(
        long bienBanBanGiaoHoSoId,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws com.liferay.portal.kernel.exception.SystemException,
            qldc.pm.tiensu.NoSuchCongViecBanGiaoException {
        return getPersistence()
                   .findByBienBanBanGiaoHoSoId_First(bienBanBanGiaoHoSoId,
            orderByComparator);
    }

    /**
    * Returns the first cong viec ban giao in the ordered set where bienBanBanGiaoHoSoId = &#63;.
    *
    * @param bienBanBanGiaoHoSoId the bien ban ban giao ho so ID
    * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
    * @return the first matching cong viec ban giao, or <code>null</code> if a matching cong viec ban giao could not be found
    * @throws SystemException if a system exception occurred
    */
    public static qldc.pm.tiensu.model.CongViecBanGiao fetchByBienBanBanGiaoHoSoId_First(
        long bienBanBanGiaoHoSoId,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence()
                   .fetchByBienBanBanGiaoHoSoId_First(bienBanBanGiaoHoSoId,
            orderByComparator);
    }

    /**
    * Returns the last cong viec ban giao in the ordered set where bienBanBanGiaoHoSoId = &#63;.
    *
    * @param bienBanBanGiaoHoSoId the bien ban ban giao ho so ID
    * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
    * @return the last matching cong viec ban giao
    * @throws qldc.pm.tiensu.NoSuchCongViecBanGiaoException if a matching cong viec ban giao could not be found
    * @throws SystemException if a system exception occurred
    */
    public static qldc.pm.tiensu.model.CongViecBanGiao findByBienBanBanGiaoHoSoId_Last(
        long bienBanBanGiaoHoSoId,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws com.liferay.portal.kernel.exception.SystemException,
            qldc.pm.tiensu.NoSuchCongViecBanGiaoException {
        return getPersistence()
                   .findByBienBanBanGiaoHoSoId_Last(bienBanBanGiaoHoSoId,
            orderByComparator);
    }

    /**
    * Returns the last cong viec ban giao in the ordered set where bienBanBanGiaoHoSoId = &#63;.
    *
    * @param bienBanBanGiaoHoSoId the bien ban ban giao ho so ID
    * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
    * @return the last matching cong viec ban giao, or <code>null</code> if a matching cong viec ban giao could not be found
    * @throws SystemException if a system exception occurred
    */
    public static qldc.pm.tiensu.model.CongViecBanGiao fetchByBienBanBanGiaoHoSoId_Last(
        long bienBanBanGiaoHoSoId,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence()
                   .fetchByBienBanBanGiaoHoSoId_Last(bienBanBanGiaoHoSoId,
            orderByComparator);
    }

    /**
    * Returns the cong viec ban giaos before and after the current cong viec ban giao in the ordered set where bienBanBanGiaoHoSoId = &#63;.
    *
    * @param congViecBanGiaoId the primary key of the current cong viec ban giao
    * @param bienBanBanGiaoHoSoId the bien ban ban giao ho so ID
    * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
    * @return the previous, current, and next cong viec ban giao
    * @throws qldc.pm.tiensu.NoSuchCongViecBanGiaoException if a cong viec ban giao with the primary key could not be found
    * @throws SystemException if a system exception occurred
    */
    public static qldc.pm.tiensu.model.CongViecBanGiao[] findByBienBanBanGiaoHoSoId_PrevAndNext(
        long congViecBanGiaoId, long bienBanBanGiaoHoSoId,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws com.liferay.portal.kernel.exception.SystemException,
            qldc.pm.tiensu.NoSuchCongViecBanGiaoException {
        return getPersistence()
                   .findByBienBanBanGiaoHoSoId_PrevAndNext(congViecBanGiaoId,
            bienBanBanGiaoHoSoId, orderByComparator);
    }

    /**
    * Removes all the cong viec ban giaos where bienBanBanGiaoHoSoId = &#63; from the database.
    *
    * @param bienBanBanGiaoHoSoId the bien ban ban giao ho so ID
    * @throws SystemException if a system exception occurred
    */
    public static void removeByBienBanBanGiaoHoSoId(long bienBanBanGiaoHoSoId)
        throws com.liferay.portal.kernel.exception.SystemException {
        getPersistence().removeByBienBanBanGiaoHoSoId(bienBanBanGiaoHoSoId);
    }

    /**
    * Returns the number of cong viec ban giaos where bienBanBanGiaoHoSoId = &#63;.
    *
    * @param bienBanBanGiaoHoSoId the bien ban ban giao ho so ID
    * @return the number of matching cong viec ban giaos
    * @throws SystemException if a system exception occurred
    */
    public static int countByBienBanBanGiaoHoSoId(long bienBanBanGiaoHoSoId)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence().countByBienBanBanGiaoHoSoId(bienBanBanGiaoHoSoId);
    }

    /**
    * Caches the cong viec ban giao in the entity cache if it is enabled.
    *
    * @param congViecBanGiao the cong viec ban giao
    */
    public static void cacheResult(
        qldc.pm.tiensu.model.CongViecBanGiao congViecBanGiao) {
        getPersistence().cacheResult(congViecBanGiao);
    }

    /**
    * Caches the cong viec ban giaos in the entity cache if it is enabled.
    *
    * @param congViecBanGiaos the cong viec ban giaos
    */
    public static void cacheResult(
        java.util.List<qldc.pm.tiensu.model.CongViecBanGiao> congViecBanGiaos) {
        getPersistence().cacheResult(congViecBanGiaos);
    }

    /**
    * Creates a new cong viec ban giao with the primary key. Does not add the cong viec ban giao to the database.
    *
    * @param congViecBanGiaoId the primary key for the new cong viec ban giao
    * @return the new cong viec ban giao
    */
    public static qldc.pm.tiensu.model.CongViecBanGiao create(
        long congViecBanGiaoId) {
        return getPersistence().create(congViecBanGiaoId);
    }

    /**
    * Removes the cong viec ban giao with the primary key from the database. Also notifies the appropriate model listeners.
    *
    * @param congViecBanGiaoId the primary key of the cong viec ban giao
    * @return the cong viec ban giao that was removed
    * @throws qldc.pm.tiensu.NoSuchCongViecBanGiaoException if a cong viec ban giao with the primary key could not be found
    * @throws SystemException if a system exception occurred
    */
    public static qldc.pm.tiensu.model.CongViecBanGiao remove(
        long congViecBanGiaoId)
        throws com.liferay.portal.kernel.exception.SystemException,
            qldc.pm.tiensu.NoSuchCongViecBanGiaoException {
        return getPersistence().remove(congViecBanGiaoId);
    }

    public static qldc.pm.tiensu.model.CongViecBanGiao updateImpl(
        qldc.pm.tiensu.model.CongViecBanGiao congViecBanGiao)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence().updateImpl(congViecBanGiao);
    }

    /**
    * Returns the cong viec ban giao with the primary key or throws a {@link qldc.pm.tiensu.NoSuchCongViecBanGiaoException} if it could not be found.
    *
    * @param congViecBanGiaoId the primary key of the cong viec ban giao
    * @return the cong viec ban giao
    * @throws qldc.pm.tiensu.NoSuchCongViecBanGiaoException if a cong viec ban giao with the primary key could not be found
    * @throws SystemException if a system exception occurred
    */
    public static qldc.pm.tiensu.model.CongViecBanGiao findByPrimaryKey(
        long congViecBanGiaoId)
        throws com.liferay.portal.kernel.exception.SystemException,
            qldc.pm.tiensu.NoSuchCongViecBanGiaoException {
        return getPersistence().findByPrimaryKey(congViecBanGiaoId);
    }

    /**
    * Returns the cong viec ban giao with the primary key or returns <code>null</code> if it could not be found.
    *
    * @param congViecBanGiaoId the primary key of the cong viec ban giao
    * @return the cong viec ban giao, or <code>null</code> if a cong viec ban giao with the primary key could not be found
    * @throws SystemException if a system exception occurred
    */
    public static qldc.pm.tiensu.model.CongViecBanGiao fetchByPrimaryKey(
        long congViecBanGiaoId)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence().fetchByPrimaryKey(congViecBanGiaoId);
    }

    /**
    * Returns all the cong viec ban giaos.
    *
    * @return the cong viec ban giaos
    * @throws SystemException if a system exception occurred
    */
    public static java.util.List<qldc.pm.tiensu.model.CongViecBanGiao> findAll()
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence().findAll();
    }

    /**
    * Returns a range of all the cong viec ban giaos.
    *
    * <p>
    * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link qldc.pm.tiensu.model.impl.CongViecBanGiaoModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
    * </p>
    *
    * @param start the lower bound of the range of cong viec ban giaos
    * @param end the upper bound of the range of cong viec ban giaos (not inclusive)
    * @return the range of cong viec ban giaos
    * @throws SystemException if a system exception occurred
    */
    public static java.util.List<qldc.pm.tiensu.model.CongViecBanGiao> findAll(
        int start, int end)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence().findAll(start, end);
    }

    /**
    * Returns an ordered range of all the cong viec ban giaos.
    *
    * <p>
    * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link qldc.pm.tiensu.model.impl.CongViecBanGiaoModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
    * </p>
    *
    * @param start the lower bound of the range of cong viec ban giaos
    * @param end the upper bound of the range of cong viec ban giaos (not inclusive)
    * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
    * @return the ordered range of cong viec ban giaos
    * @throws SystemException if a system exception occurred
    */
    public static java.util.List<qldc.pm.tiensu.model.CongViecBanGiao> findAll(
        int start, int end,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence().findAll(start, end, orderByComparator);
    }

    /**
    * Removes all the cong viec ban giaos from the database.
    *
    * @throws SystemException if a system exception occurred
    */
    public static void removeAll()
        throws com.liferay.portal.kernel.exception.SystemException {
        getPersistence().removeAll();
    }

    /**
    * Returns the number of cong viec ban giaos.
    *
    * @return the number of cong viec ban giaos
    * @throws SystemException if a system exception occurred
    */
    public static int countAll()
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence().countAll();
    }

    public static CongViecBanGiaoPersistence getPersistence() {
        if (_persistence == null) {
            _persistence = (CongViecBanGiaoPersistence) PortletBeanLocatorUtil.locate(qldc.pm.tiensu.service.ClpSerializer.getServletContextName(),
                    CongViecBanGiaoPersistence.class.getName());

            ReferenceRegistry.registerReference(CongViecBanGiaoUtil.class,
                "_persistence");
        }

        return _persistence;
    }

    /**
     * @deprecated As of 6.2.0
     */
    public void setPersistence(CongViecBanGiaoPersistence persistence) {
    }
}
